package com.cskaoyan.service.impl;

import com.cskaoyan.mapper.MarketStorageMapper;
import com.cskaoyan.model.MarketStorage;
import com.cskaoyan.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class StorageServiceImpl implements StorageService {
    @Autowired
    MarketStorageMapper marketStorageMapper;
    @Override
    public int create(MarketStorage marketStorage) {
        Date current = new Date();
        marketStorage.setAddTime(current);
        marketStorage.setUpdateTime(current);
        //选择性的插入其中
        return marketStorageMapper.insertSelective(marketStorage);
    }
}
